package org.example.utils;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogUtils {

    private static final Logger LOG = LoggerFactory.getLogger(LogUtils.class.getName());

    public static void main(String[] args) {
        LogUtils.info("hello world");
    }

    public static void info(String msg) {
        StackTraceElement[] traceElements = Thread.currentThread().getStackTrace();
        StackTraceElement traceElement = traceElements[2];
        LOG.info(String.format("%s.%s=====>%s", traceElement.getClassName(), traceElement.getMethodName(), msg));
    }

    public static void sleepSeconds(long time) {
        try {
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
